package com.yangyu.message;

import lombok.Data;

import java.io.Serializable;

@Data
public class BaseRsp implements Serializable {

    private int code;
    private String message;
    private Object data;
    private Page page;

    public BaseRsp() {
        this.code = 200;
        this.message = "success";
    }

    public BaseRsp(Object data) {
        this.code = 200;
        this.message = "success";
        this.data = data;
    }

    public BaseRsp(Object data, Page page) {
        this.code = 200;
        this.message = "success";
        this.data = data;
        this.page = page;
    }

    public BaseRsp(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public BaseRsp(int code, String message, Object date) {
        this.code = code;
        this.message = message;
        this.data = date;
    }
}
